Option Strict On
Option Explicit On

Imports System

Public Interface IViewOrTableColumn
   Property Name() As String
   Property AllowNulls() As Nullable(Of Boolean)
   Property NETType() As String
   Property Caption() As String
   Property OriginalName() As String
   Property IsAutoIncrement() As Nullable(Of Boolean)
   Property IsPrimaryKey() As Nullable(Of Boolean)
   Property MaxLength() As Nullable(Of Int32)
   Property SqlType() As String
   ReadOnly Property Attributes() As Attributes
   ' Property UseForDesc() As Boolean
   ' Property Ordinal() As Int32
End Interface

Public Class ViewOrTableColumnCollection
   Inherits System.Collections.ObjectModel.Collection(Of IViewOrTableColumn)

   Default Public Overloads ReadOnly Property Item(ByVal name As String) As DbsTableColumn
      Get
         For Each column As DbsTableColumn In Me
            If column.Name = name Then
               Return column
            End If
         Next
         For Each column As DbsTableColumn In Me
            If column.OriginalName = name Then
               Return column
            End If
         Next
         Return Nothing
      End Get
   End Property
End Class
